
#import "ClientProtocol.h"
@class SocketEngine;

typedef void (*CMDFUN)(SocketEngine * socket);


@interface EventListener : NSObject
{
	CMDFUN * m_cmdMap;
	int m_cmdQuantity;
}

- (BOOL)CreateMap: (int) quantity;
- (BOOL)AddCmd: (int) cmdId fun: (CMDFUN) cmdFun;

- (void)OnConncet: (SocketEngine *) socket;
- (void)OnDisconncet: (SocketEngine *) socket;
- (void)OnRecv: (SocketEngine *) socket cmdId: (int) cmdId msgLen: (size_t) msgLen;

@end
